package com.parkingspace.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author Gapper
 * @since 2021-05-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`order`")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
      @TableId(value = "orderid", type = IdType.ASSIGN_ID)
      @JsonSerialize(using = ToStringSerializer.class)
    private Long orderid;

    /**
     * 车位id(连接车位表主键)
     */
    private Long parkingId;

    /**
     * 车辆id
     */
    private Long carid;

    /**
     * 创建时间
     */
    private Date creatTime;

    /**
     * 结束时间
     */
    private Date endTime;

    /**
     * 订单价格
     */
    private Double price;

    /**
     * 出租小时
     */
    private Long time;

    /**
     * 订单状态(0:未付款,1:已付款,2:异常)
     */
    private Integer status;

    /**
     * 备注
     */
    private String remark;

    /**
     * 软删除(0:未删除,1:已删除)
     */
    @TableLogic
    @TableField(select = false)
    private Integer softdel;


}
